import request from '@/utils/request.js'
// 汉堡键频道编辑相关接口
export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/v1_0/channels',
  })
}
// 添加频道的接口
export const addUserChannels = data => {
  return request({
    url: '/v1_0/user/channels',
    method: 'PATCH',
    data: {
      // data 表示要添加的频道对象{id，seq}
      channels: [data],
    },
  })
}
// 在线删除频道
export const deleteUserChannel = id => {
  return request({
    url: '/v1_0/user/channels/' + id,
    method: 'DELETE',
  })
}
